﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;

namespace SuperX.Common.Helper
{
    public class PythonScriptHelper
    {
        public const string ScriptDllPath = "ScriptDll";

        /// <summary>
        /// 脚本编辑器打开时将其置为True，为一些null对象赋一个默认值
        /// </summary>
        public static bool IsScriptEditMode;

        public static List<string> GetScriptDllPath()
        {
            var list = new List<string>();
            list.Add(Path.Combine(Environment.CurrentDirectory, ScriptDllPath));
            return list;
        }

        public double ConvertToDouble(object value)
        {
            return Convert.ToDouble(value);
        }

        public int ConvertToInt(object value)
        {
            return Convert.ToInt32(value);
        }

        public long ConvertToLong(object value)
        {
            return Convert.ToInt64(value);
        }
    }
}